<!DOCTYPE html>

<html class="no-js">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title></title>
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <script src="https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js"></script>
  <script src="https://cdn.staticfile.org/vue/2.5.17/vue.js"></script>
  <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.13.0/theme-chalk/index.css" />
  <script src="https://cdn.staticfile.org/element-ui/2.13.0/index.js"></script>
  <script src="https://avuex.avue.top/cdn/aliyun-oss-sdk.min.js"></script>

  <link rel="stylesheet" href="../../../lib/index.css" />
  <script src="../../../lib/avue.js"></script>
</head>

<body>
  <div id="app">
    <avue-detail :option="option" v-model="form">
      <template slot="text1" slot-scope="scope">
        <el-tag>{{scope.row.text1}}</el-tag>
      </template>
      <template slot="test" slot-scope="scope">
        <span>{{scope.row}}</span>
      </template>
    </avue-detail>
  </div>
</body>

</html>

<script>
  new Vue({
    el: '#app',
    data() {
      return {
        form: {
          text1: '文本1',
          text2: '文本2',
          text3: new Date().getTime(),
        },
        option: {
          group: [{
            icon: 'el-icon-info',
            label: '分组',
            prop: 'group',
            column: [{
              label: '内容1',
              prop: 'text1',
              formslot: true,
            }, {
              label: '选项卡2',
              prop: 'text2',
            }, {
              label: '选项卡3',
              prop: 'text3',
              type: 'datetime',
              format: 'yyyy-MM-dd hh:mm:ss',
              valueFormat: 'timestamp'
            }]
          }, {
            icon: 'el-icon-info',
            label: '自定义分组',
            slot: true,
            prop: 'test'
          }]
        }
      }
    }
  })
</script>